<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="zs:searchRetrieveResponse" xmlns:zs="http://www.loc.gov/zing/srw/">
        <xsl:apply-templates select="zs:diagnostics"
            xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/"/>
    </xsl:template>
    <xsl:template match="zs:diagnostics" xmlns:zs="http://www.loc.gov/zing/srw/">
        <SRUServiceException>
            <Message>
                <xsl:value-of select="diag:diagnostic/diag:message"
                    xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/"/>
            </Message>
            <Details>
                <xsl:value-of select="diag:diagnostic/diag:details"
                    xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/"/>
            </Details>
        </SRUServiceException>
    </xsl:template>
</xsl:stylesheet>
